[swift] closure, cast constraint
-Apr 17, 2018
You can only upcast to a parent type:
var closure : (Subclass) -> () = { (first : Superclass) in } you cannot downcast to a subclass
You can only upcast to a parent type:
var closure : (Subclass) -> () = { (first : Superclass) in } you cannot downcast to a subclass